<?
   require ('../mod_config.php');
   define('PATH_IMG_UPLOAD',$_SERVER['DOCUMENT_ROOT'].'/images/product/');
   define('PATH_IMG_PRODUCT','../../../images/product/');
   
   //Lấy danh sách chuyên mục
   $sql = "SELECT * FROM categories";
   $db = new DB();
   $categories = $db->query($sql);
   $cat_option = array();
   if(count($categories > 0)){
      foreach($categories as $item){
         $cat_option[$item['cat_id']] = $item['cat_name'];
      }
   }
   
   //Lấy danh sách nhà xuất bản   
   $sql = "SELECT * FROM publishers";
   $publishers = $db->query($sql);
   
   $pub_option = array();
   if(count($publishers) > 0){
      foreach($publishers as $item){
         $pub_option[$item['pub_id']] = $item['pub_name'];
      }
   }
   
   //Lấy danh sách tác giả
   $sql = "SELECT * FROM authors";
   $authors = $db->query($sql);
   
?>